home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / pgm_ctrl / cuactrls / ctooltip.frm < prev    next >
Text File  |  1995-05-22  |  4KB  |  133 lines

  1. VERSION 2.00
  2. Begin Form frmToolTips 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Tool tips Demo"
  5.    ClientHeight    =   2010
  6.    ClientLeft      =   1095
  7.    ClientTop       =   1485
  8.    ClientWidth     =   4725
  9.    Height          =   2415
  10.    Left            =   1035
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   2010
  13.    ScaleWidth      =   4725
  14.    Top             =   1140
  15.    Width           =   4845
  16.    Begin CUAToolTips tip1 
  17.       BackColor       =   &H0080FFFF&
  18.       Caption         =   "ToolTips"
  19.       FontBold        =   0   'False
  20.       FontItalic      =   0   'False
  21.       FontName        =   "MS Sans Serif"
  22.       FontSize        =   8.25
  23.       FontStrikethru  =   0   'False
  24.       FontUnderline   =   0   'False
  25.       Height          =   240
  26.       Left            =   3645
  27.       TabIndex        =   7
  28.       Top             =   870
  29.       Width           =   945
  30.    End
  31.    Begin CUAToolButton tbn1 
  32.       Height          =   330
  33.       Index           =   3
  34.       Left            =   2685
  35.       StandardButton  =   7  'Print
  36.       TabIndex        =   6
  37.       Top             =   825
  38.       Width           =   360
  39.    End
  40.    Begin CUAToolButton tbn1 
  41.       Height          =   330
  42.       Index           =   2
  43.       Left            =   2340
  44.       StandardButton  =   6  'Save
  45.       TabIndex        =   5
  46.       Top             =   825
  47.       Width           =   360
  48.    End
  49.    Begin CUAToolButton tbn1 
  50.       Height          =   330
  51.       Index           =   1
  52.       Left            =   1995
  53.       StandardButton  =   5  'Open
  54.       TabIndex        =   4
  55.       Top             =   825
  56.       Width           =   360
  57.    End
  58.    Begin CUAToolButton tbn1 
  59.       Height          =   330
  60.       Index           =   0
  61.       Left            =   1650
  62.       StandardButton  =   4  'New
  63.       TabIndex        =   3
  64.       Top             =   825
  65.       Width           =   360
  66.    End
  67.    Begin CUACommand cmdOK 
  68.       Cancel          =   -1  'True
  69.       Caption         =   "OK"
  70.       Default         =   -1  'True
  71.       Height          =   345
  72.       Left            =   3315
  73.       StandardButton  =   1  'OK
  74.       TabIndex        =   0
  75.       Top             =   135
  76.       Width           =   1260
  77.    End
  78.    Begin CUALabel lbl 
  79.       Caption         =   "Word 6.0 introduced this component to Windows, and it has quickly become very popular. Position the cursor over the buttons to see it work."
  80.       FontBold        =   0   'False
  81.       FontItalic      =   0   'False
  82.       FontName        =   "MS Sans Serif"
  83.       FontSize        =   8.25
  84.       FontStrikethru  =   0   'False
  85.       FontUnderline   =   0   'False
  86.       ForeColor       =   &H00000080&
  87.       Height          =   630
  88.       Index           =   0
  89.       Left            =   165
  90.       TabIndex        =   2
  91.       Top             =   1275
  92.       Width           =   3885
  93.    End
  94.    Begin CUALabel lbl 
  95.       Caption         =   "Tool tips is ""bubble help"" that is shown when you let the cursor rest for a second or two over a control."
  96.       FontBold        =   0   'False
  97.       FontItalic      =   0   'False
  98.       FontName        =   "MS Sans Serif"
  99.       FontSize        =   8.25
  100.       FontStrikethru  =   0   'False
  101.       FontUnderline   =   0   'False
  102.       ForeColor       =   &H00000080&
  103.       Height          =   615
  104.       Index           =   6
  105.       Left            =   180
  106.       TabIndex        =   1
  107.       Top             =   135
  108.       Width           =   3030
  109.    End
  110. End
  111. Option Explicit
  112.  
  113. Sub cmdOK_Click ()
  114.    Unload Me
  115. End Sub
  116.  
  117. Sub tip1_NeedText (hWnd As Integer, ToolText As String)
  118.    Select Case hWnd
  119.       Case tbn1(0).hWnd
  120.          ToolText = "New"
  121.       Case tbn1(1).hWnd
  122.          ToolText = "Open"
  123.       Case tbn1(2).hWnd
  124.          ToolText = "Save"
  125.       Case tbn1(3).hWnd
  126.          ToolText = "Print"
  127.  
  128.       Case cmdOK.hWnd
  129.          ToolText = "Close this window"
  130.    End Select
  131. End Sub
  132.  
  133.